using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using Domain;

namespace Website
{
    public partial class CreateLogin : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
        {
            if(Database.ObjectManager<Account>.Get(UserWizard.UserName) == null)
            {
                Account user = new Account();

                user.Username = UserWizard.UserName;
                user.Password = UserWizard.Password;
                user.Email = UserWizard.Email;

                Database.ObjectManager<Account>.Insert(user);
            }
        }
    }
}
